package Year2021.month10.Day21;

public class Pets {
    public String name;
    public String varieties;//品种;
    public double weight;

    public Pets(String name, String varieties, double weight) {
        this.name = name;
        this.varieties = varieties;
        this.weight = weight;
    }
    //吃;
    public void eat(){
        System.out.println("很喜欢吃饭！");
    }
    //睡;
    public  void sleep(){
        System.out.println("很喜欢睡觉！");

    }
    public void show(){
        System.out.println("宠物"+name+"\t"+"品种是"+varieties+"\t"+"体重有"+weight+"kg");
    }
}
